// $ANTLR 2.7.6 (2005-12-22): "resources/grammars/PropertyLabelParser.g" -> "PropertyLabelParser.java"$

package com.cea.papyrus.classdiagram.parsers.antlr;

import org.eclipse.uml2.uml.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Collection;
import java.util.Map;
import java.util.Vector;
import com.cea.papyrus.classdiagram.parsers.util.TypeRecognitionException;
import com.cea.papyrus.classdiagram.parsers.util.UnboundTemplateRecognitionException;


import com.cea.papyrus.classdiagram.parsers.texteditor.propertylabel.IContext;

import antlr.TokenBuffer;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.ANTLRException;
import antlr.LLkParser;
import antlr.Token;
import antlr.TokenStream;
import antlr.RecognitionException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;

public class PropertyLabelParser extends antlr.LLkParser       implements PropertyLabelParserTokenTypes
 {

	public PropertyLabelParser(TokenStream lexer, Property property) {
		this(lexer);
		setProperty(property);
		this.modifiersUsed = new HashMap<String, Boolean>();
		modifiersUsed.put("readOnly", false);
		modifiersUsed.put("union", false);	
		modifiersUsed.put("ordered", false);	
		modifiersUsed.put("unique", false);	
		modifiersUsed.put("nonunique", false);
		modifiersUsed.put("subsets ", false);
		modifiersUsed.put("redefines ", false);
		
	}
	
	/**
	 * Validation state (true = validation : does not modify the property
	 */
	private boolean isValidation = false;
	
	
	private static final boolean DEBUG = false;
	/**
	 * @return the isValidation boolean
	 */
	public boolean isValidation() {
		return isValidation;
	}

	/**
	 * @param isValidation the isValidation to set (true -> do not modify the property)
	 */
	public void setValidation(boolean isValidation) {
		this.isValidation = isValidation;
	}
	
	private com.cea.papyrus.umlutils.Package nearestPackage;
	
	/**
	 * Modified Property 
	 */
	private Property property;
	
	/**
	 * @return the property
	 */
	public Property getProperty() {
		return property;
	}

	/**
	 * @param property the property to set
	 */
	public void setProperty(Property property) {
		this.property = property;
		this.nearestPackage = new com.cea.papyrus.umlutils.Package(property.getNearestPackage());
	}
    	
     /** debug mode */
    protected final boolean debugMode = false;  	
    	
    /**
     * Debug method (~System.out.println)
     */
    private void debug(Object debug) {
    	if(debugMode) {
    		System.out.println(debug);	
    	}	
    }
    
    /**
     * Error method (~System.err.println)
     */
    private void error(Object debug) {
    	if(debugMode) {
    		System.err.println(debug);	
    	}	
    }
    
    /**
     * Context (for completion processor)
     */
    private int context = IContext.DEFAULT;
    
    /**
	 * @return the context
	 */
	public int getContext() {
		return context;
	}

	/**
	 * @param context the context to set
	 */
	public void setContext(int context) {
		this.context = context;
	}
    
    // all possible modified elements on property (with default values : necessary ?!)
    String name;
    VisibilityKind visibility = VisibilityKind.PUBLIC_LITERAL;
    boolean isDerived = false;
    Type type=null;
    int lowerMultiplicity = 1;	// default multiplicity = [1..1]
    int upperMultiplicity = 1;	// default multiplicity = [1..1]
  	String defaultValue=null;
  	// property modifiers
  	boolean isReadOnly = false;	// default value = false
  	boolean isUnique = false;	// default value = true but easier to use default = nonunique
  	boolean isOrdered = false;	// default value = false
  	boolean isDerivedUnion = false;	// default value = false
  	Collection subsettedProperties = new Vector();
  	Collection redefinedProperties = new Vector();
  	

	/**
	 * Apply values to the property. <BR> 
	 * Modifications can not be applied directly. The parser must wait the end, 
	 * until it reaches the end of the label. If the end is reached without any error,
	 * new values can be applied to the target property.
	 */
	private void applyValues() {
		if(!isValidation){
			debug("\nvalues applied :");
			debug("+  name: "+name);
			debug("+  visibility: "+visibility);
			debug("+  isDerived: "+isDerived);
			debug("+  type: "+type);
			debug("+  lower Multiplicity: "+lowerMultiplicity);
			debug("+  upper Multiplicity: "+upperMultiplicity);
			debug("+  default Value: "+defaultValue);
			debug("+  Property modifiers");
			debug("+    isReadOnly: "+isReadOnly);
			debug("+    isUnique: "+isUnique);
			debug("+    isOrdered: "+isOrdered);
			debug("+    isDerivedUnion: "+isDerivedUnion);
			debug("+  SubsettedProperties: "+subsettedProperties);
			debug("+  RedefinedProperties: "+redefinedProperties);
			
			property.setName(name);
			property.setVisibility(visibility);
			property.setIsDerived(isDerived);
			property.setType(type);
			property.setLower(lowerMultiplicity);
			property.setUpper(upperMultiplicity);
			property.setDefault(defaultValue);
			property.setIsReadOnly(isReadOnly);
			property.setIsUnique(isUnique);
			property.setIsOrdered(isOrdered);
			property.setIsDerivedUnion(isDerivedUnion);
			property.getSubsettedProperties().clear();
			property.getSubsettedProperties().addAll(subsettedProperties);
			property.getRedefinedProperties().clear();
			property.getRedefinedProperties().addAll(redefinedProperties);
		} 
	}
	
	/**
	 * Find a type given its name and a context to find it.
	 * @param name the name of the type
	 * @return the type found or <code>null</code> if the element was not found.
	 */
	 /*
	private Type findTypeByName(String name, org.eclipse.uml2.uml.Element context) throws RecognitionException {
		Type type = null;
		int numTypes = 0;
		org.eclipse.uml2.uml.Package contextPackage = context.getNearestPackage();
		
		// seek the package in which the element should be found...
		Iterator it = contextPackage.getMembers().iterator();
		while( it.hasNext() ) {
			Object tmp = it.next();
			if( tmp instanceof Type ) {
				Type element = ( Type )tmp;
				if(  element.getName().equals(name)  ) {
					numTypes++;
					type = element;
				}
			}
		}
		if(type == null) {// type not found in default package. search in imports.
			it = contextPackage.getImportedMembers().iterator();
			while( it.hasNext() ) {
				Object tmp = it.next();
				if( tmp instanceof Type ) {
					Type element = ( Type )tmp;
					if(  element.getName().equals(name)  ) {
						type = element;
						numTypes++;
					}
				}
			}
		}
		
		if(numTypes == 0) {
			throw new RecognitionException("Type "+name+" not found for property "+property.getName());
		} else if(numTypes > 1) {
			debug("There are "+numTypes+" types with the same name....");
		}
		
		return type;
	}
	*/
	
	/**
	 * Find a subsetted property given its name and a context to find it.
	 * @param name the name of the property
	 * @return the property found or <code>null</code> if the element was not found.
	 */
	private Property findSubsettedPropertyByName(String propertyName, Property property) throws RecognitionException {
		Property subsettedProperty = null;
		com.cea.papyrus.umlutils.Property utilProperty = new com.cea.papyrus.umlutils.Property(property);
		Iterator<com.cea.papyrus.umlutils.Property> it = utilProperty.getSubsettablesProperties().iterator();
		while (it.hasNext()) {
			Property tmpProperty = it.next().getUml2Property();
			if(propertyName.equals(tmpProperty.getName())) {
				subsettedProperty = tmpProperty;
			}
		}
		
		if(subsettedProperty == null) {
			throw new RecognitionException("Property "+propertyName+" has not been found or can not be subset by "+property.getName());
		} else {
			// a property has been found. check multiplicity	
			checkProperty(property, subsettedProperty);
		}
		return subsettedProperty;	
	}
	
	private void checkProperty(Property property, Property subsettedProperty) throws RecognitionException {
		int propertyLowerBound = lowerMultiplicity;	// check the new one!!
		int subsettedPropertyLowerBound = subsettedProperty.getLower();
		int propertyUpperBound = upperMultiplicity; // check the new one!!
		int subsettedPropertyUpperBound = subsettedProperty.getUpper();
		
		Type propertyType = property.getType();
		Type subsettedPropertyType = subsettedProperty.getType(); 
		
		String propertyName = property.getName();
		
		/*
		 * rule : property multiplicity is a subset of subsetted property multiplicity
		 * 1. property Lower Bound must be greater (or equal) than subsetted property Lower Bound
		 * 2. property Upper Bound must be lower (or equal) than subsetted property Upper Bound (if subsetted property Upper Bound is not '*')
		 */
		if( propertyLowerBound < subsettedPropertyLowerBound) {
			throw new RecognitionException(propertyName+" Lower Bound ("+lowerMultiplicity+") can not be lower than subsetted property Lower Bound ("+subsettedPropertyLowerBound+")");
		} else if(subsettedPropertyUpperBound != -1 && propertyUpperBound > subsettedPropertyUpperBound) {
			throw new RecognitionException(propertyName+" Upper Bound ("+upperMultiplicity+") can not be gretater than subsetted property Upper Bound ("+subsettedPropertyUpperBound+")");
		} 
		if(!propertyType.conformsTo(subsettedPropertyType)) {
			throw new RecognitionException(propertyName+" Type ("+propertyType.getName()+") does not conform to subsetted property type ("+subsettedPropertyType.getName()+")");
		}
	}
	
	/**
	 * Find a redefined property given its name and a context to find it.
	 * @param name the name of the property
	 * @return the property found or <code>null</code> if the element was not found.
	 */
	private Property findRedefinedPropertyByName(String propertyName, Property property) throws RecognitionException {
		Property redefinedProperty = null;
		Iterator it = property.getClass_().getInheritedMembers().iterator();
		while (it.hasNext()) {
			NamedElement namedElement = (NamedElement) it.next();
			if(namedElement instanceof Property) {
				Property tmpProperty = (Property)namedElement;
				if(propertyName.equals(tmpProperty.getName())) {
					redefinedProperty = tmpProperty;
				}
			}
		}
		
		if(redefinedProperty == null) {
			throw new RecognitionException("Property "+propertyName+" has not been found or can not be redefined by "+property.getName());
		} 
		return redefinedProperty;
	}
	
	// vector that keeps modifiers already used (used for completion)
	public Map<String, Boolean> modifiersUsed; 
	
	/**
	 * @return the modifiersUsed
	 */
	public Map<String, Boolean> getModifiersUsed() {
		return modifiersUsed;
	}

	/**
	 * @param modifiersUsed the modifiersUsed to set
	 */
	public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
		this.modifiersUsed = modifiersUsed;
	}

protected PropertyLabelParser(TokenBuffer tokenBuf, int k) {
  super(tokenBuf,k);
  tokenNames = _tokenNames;
}

public PropertyLabelParser(TokenBuffer tokenBuf) {
  this(tokenBuf,2);
}

protected PropertyLabelParser(TokenStream lexer, int k) {
  super(lexer,k);
  tokenNames = _tokenNames;
}

public PropertyLabelParser(TokenStream lexer) {
  this(lexer,2);
}

public PropertyLabelParser(ParserSharedInputState state) {
  super(state,2);
  tokenNames = _tokenNames;
}

	public final void label() throws RecognitionException, TokenStreamException {
		
		
		{
		_loop3:
		do {
			if ((LA(1)==WS)) {
				match(WS);
			}
			else {
				break _loop3;
			}
			
		} while (true);
		}
		{
		switch ( LA(1)) {
		case PLUS:
		case MINUS:
		case SHARP:
		case TILDE:
		{
			visibility();
			context = IContext.VISIBILITY;
			{
			_loop6:
			do {
				if ((LA(1)==WS)) {
					match(WS);
				}
				else {
					break _loop6;
				}
				
			} while (true);
			}
			break;
		}
		case DIV:
		case IDENTIFIER:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		switch ( LA(1)) {
		case DIV:
		{
			isDerived();
			context = IContext.IS_DERIVED;
			{
			_loop9:
			do {
				if ((LA(1)==WS)) {
					match(WS);
				}
				else {
					break _loop9;
				}
				
			} while (true);
			}
			break;
		}
		case IDENTIFIER:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		name();
		{
		switch ( LA(1)) {
		case WS:
		{
			{
			{
			int _cnt13=0;
			_loop13:
			do {
				if ((LA(1)==WS)) {
					match(WS);
				}
				else {
					if ( _cnt13>=1 ) { break _loop13; } else {throw new NoViableAltException(LT(1), getFilename());}
				}
				
				_cnt13++;
			} while (true);
			}
			match(COLON);
			}
			break;
		}
		case COLON:
		{
			match(COLON);
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		
				context = IContext.AFTER_COLON;
			
		property_type();
		context = IContext.PROPERTY_TYPE;
		{
		_loop15:
		do {
			if ((LA(1)==WS)) {
				match(WS);
			}
			else {
				break _loop15;
			}
			
		} while (true);
		}
		{
		switch ( LA(1)) {
		case LSQUARE:
		{
			multiplicity();
			context = IContext.MULTIPLICITY;
			{
			_loop18:
			do {
				if ((LA(1)==WS)) {
					match(WS);
				}
				else {
					break _loop18;
				}
				
			} while (true);
			}
			break;
		}
		case EOF:
		case EQ:
		case LCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		switch ( LA(1)) {
		case EQ:
		{
			defaultValue();
			context = IContext.DEFAULT_VALUE;
			break;
		}
		case EOF:
		case LCURLY:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		{
		switch ( LA(1)) {
		case LCURLY:
		{
			propertyModifiers();
			context = IContext.PROPERTY_MODIFIERS;
			break;
		}
		case EOF:
		{
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		
				applyValues();
			
	}
	
	public final void visibility() throws RecognitionException, TokenStreamException {
		
		
		{
		switch ( LA(1)) {
		case PLUS:
		{
			{
			match(PLUS);
			visibility = VisibilityKind.PUBLIC_LITERAL;
			}
			break;
		}
		case MINUS:
		{
			{
			match(MINUS);
			visibility = VisibilityKind.PRIVATE_LITERAL;
			}
			break;
		}
		case SHARP:
		{
			{
			match(SHARP);
			visibility = VisibilityKind.PROTECTED_LITERAL;
			}
			break;
		}
		case TILDE:
		{
			{
			match(TILDE);
			visibility = VisibilityKind.PACKAGE_LITERAL;
			}
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
	}
	
	public final void isDerived() throws RecognitionException, TokenStreamException {
		
		
		match(DIV);
		isDerived = true;
	}
	
	public final void name() throws RecognitionException, TokenStreamException {
		
		Token  id = null;
		
		id = LT(1);
		match(IDENTIFIER);
		
				name = id.getText();
				context = IContext.NAME;
			
	}
	
	public final void property_type() throws RecognitionException, TokenStreamException {
		
		
		{
		_loop31:
		do {
			if ((LA(1)==WS)) {
				match(WS);
			}
			else {
				break _loop31;
			}
			
		} while (true);
		}
		{
		switch ( LA(1)) {
		case IDENTIFIER:
		{
			type();
			break;
		}
		case LT:
		{
			match(LT);
			match(LITERAL_Undefined);
			match(GT);
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
	}
	
	public final void multiplicity() throws RecognitionException, TokenStreamException {
		
		
		match(LSQUARE);
		context = IContext.IN_MULTIPLICITY;
		{
		if ((LA(1)==INTEGER) && (LA(2)==POINT_POINT)) {
			lowerMultiplicity();
			match(POINT_POINT);
			upperMultiplicity();
			
						if(lowerMultiplicity > upperMultiplicity && upperMultiplicity != -1) {
							throw new RecognitionException("Lower bound ("+lowerMultiplicity+") is greater than upper bound ("+upperMultiplicity+")");
						}
					
		}
		else if ((LA(1)==INTEGER||LA(1)==STAR) && (LA(2)==RSQUARE)) {
			upperMultiplicity();
			
						if(upperMultiplicity == -1) {
							lowerMultiplicity = 0;
						} else {
							lowerMultiplicity = upperMultiplicity;
						}
					
		}
		else {
			throw new NoViableAltException(LT(1), getFilename());
		}
		
		}
		match(RSQUARE);
	}
	
	public final void defaultValue() throws RecognitionException, TokenStreamException {
		
		
		match(EQ);
		defaultValue=expression();
		
				// remove spaces at the begining 
				defaultValue = defaultValue.trim();
			
	}
	
	public final void propertyModifiers() throws RecognitionException, TokenStreamException {
		
		
		match(LCURLY);
		context = IContext.PROPERTY_MODIFIER;
		propertyModifier();
		{
		_loop47:
		do {
			if ((LA(1)==COMMA)) {
				context = IContext.PROPERTY_MODIFIER;
				match(COMMA);
				propertyModifier();
			}
			else {
				break _loop47;
			}
			
		} while (true);
		}
		match(RCURLY);
	}
	
	public final void type() throws RecognitionException, TokenStreamException {
		
		Token  id = null;
		
		id = LT(1);
		match(IDENTIFIER);
		
				String typeName = id.getText() ;
				com.cea.papyrus.umlutils.Type utilType = nearestPackage.findTypeByName(typeName);
				// type = findTypeByName(typeName, property);
				// The type has not been found, but it may have been declared in the context of a template.
				if(utilType != null) {
					if (utilType.getUml2Element() instanceof TemplateableElement) {
						TemplateableElement template = (TemplateableElement)utilType.getUml2Element() ;
						if (template.isTemplate()) {
							throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
									template) ;
						} else {
							type = utilType.getUml2Type();
						}
					}
					else {
						type = utilType.getUml2Type();
					}
				} else {
					// The type has not been found, but it may have been declared in the context of a template.
					if (property.getOwner() instanceof TemplateableElement) {
						TemplateableElement template = (TemplateableElement)property.getOwner() ;
						if (template.isTemplate()) {
							com.cea.papyrus.umlutils.TemplateSignature signatureUtil = new com.cea.papyrus.umlutils.TemplateSignature(template.getOwnedTemplateSignature()) ;
							utilType = signatureUtil.findTypeByName(typeName) ;
						}
					}
					if (utilType == null) // the type actually does not exist
						throw new TypeRecognitionException("Type "+typeName+" not found for property "+property.getName(),typeName);
					else if (utilType.getUml2Element() instanceof TemplateableElement && ((TemplateableElement)utilType.getUml2Element()).isTemplate()) {
						throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
								(TemplateableElement)utilType.getUml2Element()) ;
					}
					else
						type = utilType.getUml2Type() ;
				}
			
	}
	
	public final void lowerMultiplicity() throws RecognitionException, TokenStreamException {
		
		Token  in = null;
		
		in = LT(1);
		match(INTEGER);
		
				lowerMultiplicity = Integer.parseInt(in.getText());
			
	}
	
	public final void upperMultiplicity() throws RecognitionException, TokenStreamException {
		
		
		upperMultiplicity=unlimitedNatural();
	}
	
	public final int  unlimitedNatural() throws RecognitionException, TokenStreamException {
		int value = 0 ;
		
		Token  in = null;
		
		{
		switch ( LA(1)) {
		case STAR:
		{
			match(STAR);
			value = -1;
			break;
		}
		case INTEGER:
		{
			in = LT(1);
			match(INTEGER);
			value = Integer.parseInt(in.getText());
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
		return value;
	}
	
	public final String  expression() throws RecognitionException, TokenStreamException {
		String value  = "";
		
		Token  id = null;
		
				StringBuffer buffer = new StringBuffer();
			
		
		{
		int _cnt44=0;
		_loop44:
		do {
			if ((_tokenSet_0.member(LA(1)))) {
				{
				id = LT(1);
				match(_tokenSet_0);
				}
				
							buffer.append(id.getText());
						
			}
			else {
				if ( _cnt44>=1 ) { break _loop44; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt44++;
		} while (true);
		}
		
				value = buffer.toString();
			
		return value;
	}
	
	public final void propertyModifier() throws RecognitionException, TokenStreamException {
		
		
		{
		_loop50:
		do {
			if ((LA(1)==WS)) {
				match(WS);
			}
			else {
				break _loop50;
			}
			
		} while (true);
		}
		{
		switch ( LA(1)) {
		case LITERAL_readOnly:
		{
			match(LITERAL_readOnly);
			isReadOnly = true; modifiersUsed.put("readOnly", true);
			break;
		}
		case LITERAL_union:
		{
			match(LITERAL_union);
			isDerivedUnion = true; modifiersUsed.put("union", true);	
			break;
		}
		case LITERAL_ordered:
		{
			match(LITERAL_ordered);
			isOrdered = true; modifiersUsed.put("ordered", true);	
			break;
		}
		case LITERAL_unique:
		{
			match(LITERAL_unique);
			isUnique = true; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);
			break;
		}
		case LITERAL_nonunique:
		{
			match(LITERAL_nonunique);
			isUnique = false; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);
			break;
		}
		case LITERAL_subsets:
		{
			subsetsProperty();
			break;
		}
		case LITERAL_redefines:
		{
			redefinesProperty();
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
		}
	}
	
	public final void subsetsProperty() throws RecognitionException, TokenStreamException {
		
		Token  id = null;
		
		match(LITERAL_subsets);
		context = IContext.SUBSET_PROPERTY ;
		{
		int _cnt54=0;
		_loop54:
		do {
			if ((LA(1)==WS)) {
				match(WS);
			}
			else {
				if ( _cnt54>=1 ) { break _loop54; } else {throw new NoViableAltException(LT(1), getFilename());}
			}
			
			_cnt54++;
		} while (true);
		}
		id = LT(1);
		match(IDENTIFIER);
		
				// find property by name
				String propertyName = id.getText();
				Property tmpProperty = findSubsettedPropertyByName(propertyName, property);	
				subsettedProperties.add(tmpProperty);	
			
	}
	
	public final void redefinesProperty() throws RecognitionException, TokenStreamException {
		
		Token  id = null;
		
		match(LITERAL_redefines);
		context = IContext.REDEFINE_PROPERTY ;
		{
		_loop57:
		do {
			if ((LA(1)==WS)) {
				match(WS);
			}
			else {
				break _loop57;
			}
			
		} while (true);
		}
		id = LT(1);
		match(IDENTIFIER);
		
				// find property by name
				String propertyName = id.getText();
				Property tmpProperty = findRedefinedPropertyByName(propertyName, property);	
				redefinedProperties.add(tmpProperty);	
			
	}
	
	
	public static final String[] _tokenNames = {
		"<0>",
		"EOF",
		"<2>",
		"NULL_TREE_LOOKAHEAD",
		"WS",
		"COLON",
		"PLUS",
		"MINUS",
		"SHARP",
		"TILDE",
		"DIV",
		"IDENTIFIER",
		"LT",
		"\"Undefined\"",
		"GT",
		"LSQUARE",
		"POINT_POINT",
		"RSQUARE",
		"INTEGER",
		"STAR",
		"EQ",
		"LCURLY",
		"COMMA",
		"RCURLY",
		"\"readOnly\"",
		"\"union\"",
		"\"ordered\"",
		"\"unique\"",
		"\"nonunique\"",
		"\"subsets\"",
		"\"redefines\"",
		"NL",
		"QUESTION_MARK",
		"LNOT",
		"DOUBLE_QUOTE",
		"SINGLE_QUOTE",
		"LPAREN",
		"RPAREN",
		"DOUBLE_LCURLY",
		"DOUBLE_RCURLY",
		"LOGICAL_AND",
		"DOUBLE_LOGICAL_AND",
		"PIPE",
		"DOUBLE_PIPE",
		"POINT",
		"SEMI",
		"FOUR_POINTS",
		"RULE_ASSIGN",
		"ARROW",
		"ISEQ",
		"ISNE",
		"DOUBLE_LT",
		"LE",
		"DOUBLE_GT",
		"GE",
		"INCR",
		"DECR",
		"CALLOPERATION",
		"DIGIT",
		"ALPHA",
		"UNDERSCORE",
		"REAL",
		"REAL_OR_INT"
	};
	
	private static final long[] mk_tokenSet_0() {
		long[] data = { 9223372036852678640L, 0L, 0L, 0L};
		return data;
	}
	public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
	
	}
